From e2ed31dd0112dc3bede53ceef9b957d2810e141e Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Wed, 27 Aug 2025 08:24:58 +0000
Subject: (김준회) 임시 관리자 페이지 - EDP 데이터 수동 관리 추가 및 세션검증
 추가
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app/[lng]/admin/layout.tsx | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 app/[lng]/admin/layout.tsx

(limited to 'app/[lng]/admin/layout.tsx')

diff --git a/app/[lng]/admin/layout.tsx b/app/[lng]/admin/layout.tsx
new file mode 100644
index 00000000..918a8554
--- /dev/null
+++ b/app/[lng]/admin/layout.tsx
@@ -0,0 +1,34 @@
+import { getServerSession } from "next-auth"
+import { authOptions } from "@/app/api/auth/[...nextauth]/route"
+import { redirect } from "next/navigation"
+
+export default async function AdminLayout({
+  children,
+}: {
+  children: React.ReactNode
+}) {
+  const session = await getServerSession(authOptions)
+  
+  // 세션이 없거나 domain이 'evcp'가 아닌 경우 접근 거부
+  if (!session?.user || session.user.domain !== 'evcp') {
+    redirect('/en/evcp')
+  }
+
+  return (
+    <div className="min-h-screen bg-gray-50">
+      <div className="bg-white shadow-sm border-b">
+        <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
+          <div className="flex justify-between items-center py-4">
+            <h1 className="text-2xl font-bold text-gray-900">임시 관리자 페이지</h1>
+            <div className="text-sm text-gray-600">
+              {session.user.name} ({session.user.email})
+            </div>
+          </div>
+        </div>
+      </div>
+      <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
+        {children}
+      </div>
+    </div>
+  )
+}
-- 
cgit v1.2.3

